Skip to content

Instantly share code, notes, and snippets.

@epsdel1994
epsdel1994 / board.c
Created February 21, 2018 01:19
Implementation of bitboard for reversi
#include <stdint.h>
/* for Reversi (8x8) */
uint64_t shiftl(uint64_t b){ return (b << 1) & 0xfefefefefefefefe; }
uint64_t shiftr(uint64_t b){ return (b >> 1) & 0x7f7f7f7f7f7f7f7f; }
uint64_t shiftu(uint64_t b){ return (b << 8); }
uint64_t shiftd(uint64_t b){ return (b >> 8); }
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 18, 2026 00:18
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@shirakaba
shirakaba / How NativeScript's JS->native bindings work.md
Last active April 18, 2026 00:18
How NativeScript's JS->native bindings work

[Draft] Deep-dive: How NativeScript's JS->native bindings work

What is NativeScript?

NativeScript is a JavaScript runtime that allows you to write an iOS or Android app entirely in TypeScript or JavaScript with no compromises. That is to say, it provides you with the same level of native access that writing the app in Obj-C/Swift (for iOS) or Java/Kotlin (for Android) does. Not just JSON-serialisable data types like NSString, but all data types are supported. To illustrate what it's all about, here's how you would get the battery level using NativeScript (the below snippet is entirely JS code!):

import { isIOS, isAndroid, Application } from "@nativescript/core";

/**

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@iam-veeramalla
iam-veeramalla / claude_with_ollama.md
Last active April 18, 2026 00:16
claude code integration with ollama to use local models

Run Claude with the power of Local LLMs using Ollama

Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Pull the Model

ollama pull glm-4.7-flash # or gpt-oss:20b (for better performance)

@jfuellert
jfuellert / ScrollableView.swift
Last active April 18, 2026 00:09
A scrollable SwiftUI view, UIScrollView wrapper. ScrollableView lets you read and write content offsets for scrollview in SwiftUI, with and without animations.
import SwiftUI
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable {
// MARK: - Coordinator
final class Coordinator: NSObject, UIScrollViewDelegate {
// MARK: - Properties
private let scrollView: UIScrollView
var offset: Binding<CGPoint>
@iamhenry
iamhenry / Software Design Document (SDD).md
Last active April 18, 2026 00:05
Software Design Document Template

Software Design Document (SDD)

1. Introduction

  • Purpose: [Describe the purpose of this document. E.g., to define the design of the XYZ system.]
  • Scope: [Summarize the system's objectives and what is in/out of scope.]
  • Definitions and Acronyms: [List and define important terms.]
  • References: [Link to related documents: requirements, API specs, etc.]

@nxrighthere
nxrighthere / Unreal-AgX-Tonemapper.usf
Last active April 18, 2026 00:05
AgX tonemapping for Unreal Engine 5
// See image comparison https://imgur.com/a/9L2P7GJ
// Read details https://iolite-engine.com/blog_posts/minimal_agx_implementation
// Usage:
// 1. Open "Project Settings" and change "Working Color Space" to "sRGB / Rec709"
// 2. Open `Engine\Shaders\Private\PostProcessTonemap.usf` file
// 3. Find `half3 OutDeviceColor = ColorLookupTable(FinalLinearColor);` line
// 4. Replace it with `half3 OutDeviceColor = ApplyAgX(FinalLinearColor);` line
// 5. Find `half3 ColorLookupTable( half3 LinearColor )` function
// 6. After the scope of the function, add the code below and run `RecompileShaders Changed` from console